package imoney.shared.exception;

import java.io.Serializable;

/**
 * Personal Exception to indicate an already existing item in a list
 * or database. The localizedMessage contains the specific informations.
 * @author Arnaud PELOQUIN
 *
 */
public class AlreadyExistingException extends Exception implements Serializable {

	private static final long serialVersionUID = 22022013L;
	String message="";
	
	/**
	 * Create a new alreadyExistingException. To read the message, call getLocalizedMessage().
	 * @param message : the String message to explain the reason for throwing this exception.
	 */
	public AlreadyExistingException(String message){
		this.message=message;
	}
	
	public AlreadyExistingException(){
		this(" no details stored ");
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	/**
	 * Get the iMoney developper message.
	 */
	@Override
	public String getLocalizedMessage(){
		return message;
	}
}
